**** RETURN Qty  to Pharmacy
DR='N:'
F10='DRUGS'
SELE 10
    USE &DR&F10 INDEX &DR&F10
    SEEK PHAR
    IF .NOT. EOF()
       	IF REC_LOCK(0)
           	REPL ST_ACT_TOT WITH ST_ACT_TOT+PHX
           	if buy_sell_r>0
              	   REPL ST_ACT_BUY WITH INT(ST_ACT_TOT/BUY_SELL_R)
           	endif
           	   REPL ST_ACT_SEL WITH ST_ACT_TOT-(ST_ACT_BUY*BUY_SELL_R)
		ENDIF
        UNLOCK
	ELSE
       	F10='DISPOS'
        USE &DR&F10 INDE &DR&F10
        SEEK PHAR
        IF .NOT. EOF()
           	IF REC_LOCK(0)
               	   REPL ST_ACT_TOT WITH ST_ACT_TOT+PHX
	           if buy_sell_r>0
                      REPL ST_ACT_BUY WITH INT(ST_ACT_TOT/BUY_SELL_R)
              	   endif
               	   REPL ST_ACT_SEL WITH ST_ACT_TOT-(ST_ACT_BUY*BUY_SELL_R)
           	ENDIF
           	UNLOCK
	ENDIF
ENDIF
return